<template>
  <!-- <link rel="stylesheet" type="text/css" href="@/iconfont/iconfont.css"> -->
  <div class="rightNav">
    <el-row v-for="item in rows" :key="item.id">
      <el-col :span="1">
        <div class="grid_content">
          <a class="asks" href="javascript:;">
            <i :class="item.icon" class="iconfont"></i>
            <div class="nav_left" v-html="item.msg"></div>
          </a>
        </div>
      </el-col>
    </el-row>
    <el-backtop :bottom="100" :right="10">
      <div class="back_to_top">Top</div>
    </el-backtop>
  </div>
</template>
<script>
export default {
  name: "rightNav",
  components: {},
  // 存数据
  data() {
    return {
      rows: [
        {
          id: "1",
          icon: "iconshouji",
          msg: `<span>扫码领取</span> <div class='tdCode show'><img class="imgs" src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/78c30d4f259ed43ab20e810a522a6249.png"><span>扫码领取新人百元礼包</span></div>`
        },
        {
          id: "2",
          icon: "iconxiazai",
          msg: `<span>个人中心</span>`
        },
        {
          id: "3",
          icon: "iconxiuli",
          msg: `<span>售后服务</span>`
        },
        {
          id: "4",
          icon: "iconkefu",
          msg: `<span>人工客服</span>`
        },
        {
          id: "5",
          icon: "icongouwucheman",
          msg: `<span>购物车</span>`
        }
      ]
    };
  },
  setup() {}
};
</script>

<style lang='less' scoped>
.rightNav {
  position: fixed;
  bottom: 160px;
  right: 0px;
  width: 60px;
  border: rgba(194, 191, 191, 0.486) 0.5px solid;
  background: #fff;
  border-radius: 3px;
  .grid_content {
    position: relative;
    text-align: center;
    a {
      display: block;
      padding: 9px 0;
      width: 60px;
      height: 100%;
      text-align: center;
      background-clip: border-box;
      .nav_left {
        border-radius: 2px;
        // position: absolute;
        // right: 10px;
        // top: 0;
        // padding: 8px;
        // border: 1px solid #dfdfdf;
        // background-color: #fff;
        // &::after{
        //     content: "";
        //     position: absolute;
        //     top:11px;
        //     right:-9px;
        //     width: 0;
        //     height: 0;
        //     border: 4.5px solid  rgba(255, 255, 255, 0);
        //     border-left: 4.5px #fff solid;
        //     z-index:2;
        // }
        // &::before{
        //     content: "";
        //     position: absolute;
        //     top:10px;
        //     right:-12px;
        //     width: 0;
        //     height: 0;
        //     border: 6px solid  rgba(255, 255, 255, 0);
        //     border-left: 6px #dfdfdf solid;
        // }
      }
      // .show{
      //     display: none;
      // }
    }
    .ask:hover .show {
      display: block;
    }
  }

  .iconfont {
    font-family: "iconfont" !important;
    font-size: 40px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: rgb(194, 191, 191);
    padding: 5px 0;
  }
  data-a:hover data-a.show {
    display: block;
  }

  .back_to_top {
    height: 100%;
    width: 100%;
    background-color: #f2f5f6;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
    text-align: center;
    line-height: 40px;
    color: rgba(226, 221, 221, 0.87);
  }
}
</style>

<style scoped>
.rightNav >>> .el-row {
  border-bottom: rgba(226, 221, 221, 0.87) 1px solid;
  text-align: center;
}
.rightNav >>> .el-row:last-child {
  border-bottom: none;
}
.rightNav >>> .el-row:hover i {
  color: #ff6700;
}

.rightNav .nav_left >>> img.imgs {
  width: 100px;
  height: 100px;
}
.rightNav .nav_left >>> span {
  display: inline-block;
  width: 60px;
}

.asks >>> .tdCode {
  position: absolute;
  right: 10px;
  top: 0;
  padding: 8px;
  border-radius: 2px;
  border: 1px solid #dfdfdf;
  background-color: #fff;
}
.asks >>> .tdCode::after {
  content: "";
  position: absolute;
  top: 11px;
  right: -9px;
  width: 0;
  height: 0;
  border: 4.5px solid rgba(255, 255, 255, 0);
  border-left: 4.5px #fff solid;
  z-index: 2;
}
.asks >>> .tdCode::before {
  content: "";
  position: absolute;
  top: 10px;
  right: -12px;
  width: 0;
  height: 0;
  border: 6px solid rgba(255, 255, 255, 0);
  border-left: 6px #dfdfdf solid;
}
.asks >>> .show {
  display: none;
}
.grid_content >>> .asks:hover .show {
  display: block;
}
</style>
